

Countdown= {
	initialTime = 0,
	endTime = 0,
}

function Countdown:new(o)
	o = o or {}
	setmetatable(o, self)
	self.__index = self
	return o
end

function Countdown:check() -- returns true as long timer is not over
	if engine.clock.time < self.endTime then 
		return true
	else
		return false
	end
end

function newCountdown(_time) -- time in seconds

		o = Countdown:new{
			initialTime = engine.clock.time, --use time because its easier then minues and seconds
			endTime = engine.clock.time + _time/100,
		}
		return o
end

